<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/10/19
  Time: 8:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<script src="<%=request.getContextPath() %>/static/js/jquery.min.js" type="text/javascript"></script>
<html>
<head>

    <title>支付成功</title>
    <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pay/paySuccess.css">
    <%--hearder.css--%>

</head>
<body>

<%--///order_num--%>
<%--//course_name--%>
<%--//flow_cost--%>
<%--//flow_pay_time--%>
<%--//页面显示几秒通过courseId进入详情页--%>
   <div class="main">
       <h2>购买成功</h2>
       <table>
           <tr>
               <td>
                   订单编号: ${flowDetail.data.flowId}
               </td>
           </tr>
           <td>
               完成时间: ${flowDetail.data.flowPayTime }
           </td>
           <tr>
           </tr>
           <td>
               实付金额: ${flowDetail.data.flowCost }
           </td>
           <tr>
           </tr>
       </table>

       <p><span id="mySecond">10</span>秒跳转学习页面 <a href="${pageContext.request.contextPath}/learn/${courseId}">点我去学习</a></p>

   </div>

<script type="text/javascript">

    //获取显示秒数的元素，通过定时器来更改秒数。
    var num=9;
    function count(){
        document.getElementById("mySecond").innerHTML = num;
        num--;
        setTimeout("count()",1000);
        if(num==1){
            <%--window.location.assign("${pageContext.request.contextPath}/learn/${courseId}");--%>
        }
    }
    setTimeout("count()",1000);

    //通过window.history对象来控制网页的跳转。
    function goBack(){
        window.history.back();
    }
</script>

</body>
</html>
